import {useRouter} from "vue-router";
import {getUrlParam, getUrlPath} from "./ruoyi.js";

export function useTcRouter() {
    const router = useRouter();

    function goPage(link) {
        if (link) {
            const path = getUrlPath(link);
            const param = getUrlParam(link);

            // 跳转链接
            router.push({
                path: path,
                query: {
                    ...param
                }
            });
        }
    }

    return {goPage}
}


